<template>
	<view class="header">文件上传</view>
	<view class="wrapper">
		<!-- {{reqData}} -->
		图片现实的地方
		<image :src="path"></image>
	</view>
	<button type="primary" @click="uploadFile">选择文件上传</button>
</template>

<script setup>
import {ref} from 'vue'
import {uploadImage} from '@/utils/upload'

const imgSrc = ref('')

async function uploadFile() {
	const res = await uploadImage({
		url: 'https://unidemo.dcloud.net.cn/upload'
	})
	imgSrc.value = path
	// console.log(res);
	// console.log(JSON.parse(res.data));
}
</script>

<style lang="scss">
@import '../wrapper.scss';
</style>